﻿using SH.Common.DataDictionary;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SH.Multitenant.Domain.RBAC
{
    public class Permission : Tenant
    {
        /// <summary>
        /// 自增列
        /// </summary>

        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        /// <summary>
        /// 权限编号
        /// </summary>
        public string PId { get; set; }
        /// <summary>
        /// 权限名称
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(255)")]
        public string? PName { get; set; }
        /// <summary>
        /// 父类编号
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(255)")]
        public string? ParentId { get; set; }
        /// <summary>
        /// 路径
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(255)")]
        public string? Path { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "Nvarchar(100)")]
        public string? Icon { get; set; } = string.Empty;
    }
}
